import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'login',
      component: () => import('../views/login.vue'),
    },
    {
      path: '/login',
      name: 'login1',
      component: () => import('../views/login.vue'),
    },
    {
      path: '/main',
      name: 'main',
      component: () => import('../layout/index.vue'),
      children:[
        {
          path: '',
          name: 'shouye',
          component: () => import('../views/shouye.vue'),
        },
        {
          path: '/student',
          name: 'student',
          component: () => import('../views/student.vue'),
        },
      ]
    },
  ],
})

export default router
